package com.tbit.uqbike.constant.enums;

/**
 * @Author HZW
 * @ClassName test
 * @Description 还车日志枚举
 * @date 2022/1/5 15:15
 * @Version 1.0
 */
public enum OrderStatusEnum {
    DISPATCH_PARK(1, "在还车点内"),
    DISPATCH_NOT_PARK(2, "不支持调度不在还车点"),
    DISPATCH_NOT_IN_AREA(3, "支持调度不在运营区域"),
    DISPATCH_NO_IN_PARK(4, "支持调度不在还车点"),
    DISPATCH_HELMET(5, "头盔锁不在位"),
    DISPATCH_RUN(6, "车辆运动中"),
    DISPATCH_NO_CARSTATUS(7, "未检测到车辆状态"),
    DISPATCH_VERTICAL(8, "垂直停车角度错误"),
    DISPATCH_BLE(9, "获取道钉失败"),
    DISPATCH_RFID(10, "获取RFID失败"),
    DISPATCH_NFC(11, "获取NFC失败"),
    DISPATCH_SXT(12, "获取摄像头失败"),
    ISPATCH_JC(13, "获取脚撑失败"),
    DISPATCH_OVERFLOW_PARK(14, "满桩站点，属于支持调度不在还车点"),
    DISPATCH_HELMET_EX(15, "头盔锁不满足条件，下发关闭头盔锁指令，请重试"),
    /**
     * 拍照或扫二维码辅助还车
     */
    //DISPATCH_PHOTO_RETURN(27, "拍车牌辅助还车"),
    /**
     * 扫二维码辅助还车
     */

    //DISPATCH_QR_RETURN(28, "扫二维码辅助还车"),

    /**
     * 拍照或扫二维码辅助还车
     */
    //DISPATCH_PHOTO_OR_QR_RETURN(29, "拍照或扫二维码辅助还车"),



    ;
    private int index;
    private String desc;

    OrderStatusEnum(int index, String desc) {
        this.index = index;
        this.desc = desc;
    }

    public static OrderStatusEnum of(int orderStatus) {
        for (OrderStatusEnum temp : OrderStatusEnum.values()) {
            if (temp.getIndex() == orderStatus) {
                return temp;
            }
        }
        return null;
    }

    public static void main(String[] args) {
        String OrderStatusDes = OrderStatusEnum.of(10).getDesc();
        System.out.println(OrderStatusDes);
    }

    public int getIndex() {
        return index;
    }

    public String getDesc() {
        return desc;
    }
}
